/*
 *  HeartBeatController.h
 *  project8
 *
 *  Created by Luca Gobbo on 21-06-10.
 *  Copyright 2010 __MyCompanyName__. All rights reserved.
 *
 */

#ifndef _HEARTBEATCONTROLLER_H
#define _HEARTBEATCONTROLLER_H

#include "Led.h"
#include "InfraredSensor.h"
#include "Timer.h"

class HeartBeatController  {
public:
    void run();
    void heartBeat();
    void eraseData();
    unsigned char getAVG();
    unsigned char getCUR();
    unsigned char getHIG();
    void timeOut();
private:
    int beats;
    int preAVG;
    unsigned char hbAVG;
    unsigned char hbCUR;
    unsigned char hbHIG;
    unsigned char tzMAX;
    unsigned char tzMIN;
    Led led;
    InfraredSensor infraredSensor;
    Timer hbTimer;
};


#endif